package com.essc.utils;

import org.springframework.util.DigestUtils;

public class Md5Util {
    //封装一个方法 对密码进行加密
    public static String getMD5Pwd(String password, String salt) {
        String md5Pwd = password + salt;
        //加密
        for (int i = 0; i < 10; i++) {
            md5Pwd = DigestUtils.md5DigestAsHex(md5Pwd.getBytes());
        }
        return md5Pwd;
    }
}
